#include "led.h"

//------------------------------------------------------------------------------
// Funktionsdefinitionen
//------------------------------------------------------------------------------

void init_yellow_led()
{
  *PIOB_PER = YELLOW_LED_BIT;
  *PIOB_OER = YELLOW_LED_BIT;
}


//------------------------------------------------------------------------------
// Gelbe LED
void switch_yellow_led_on()
{
  *PIOB_SODR = YELLOW_LED_BIT;
}

void switch_yellow_led_off()
{
  *PIOB_CODR = YELLOW_LED_BIT;
}

//------------------------------------------------------------------------------
// Rote LED
void init_red_led()
{
  *PIOC_PER = RED_LED_BIT;
  *PIOC_OER = RED_LED_BIT;
}

void switch_red_led_on()
{
  *PIOC_SODR = RED_LED_BIT;
}


void switch_red_led_off()
{
  *PIOC_CODR = RED_LED_BIT;
}
//------------------------------------------------------------------------------
// Grüne LED
void init_green_led()
{
  *PIOC_PER = GREEN_LED_BIT;
  *PIOC_OER = GREEN_LED_BIT;
}

void disable_green_led()
{
  *PIOC_PDR = GREEN_LED_BIT;
}

void switch_green_led_on()
{
  *PIOC_SODR = GREEN_LED_BIT;
}


void switch_green_led_off()
{
  *PIOC_CODR = GREEN_LED_BIT;
}
//---